chrome-devtools-frontend 1.0.1030070 → 1.0.1031400

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/config/gni/devtools_grd_files.gni +3 -0
  2. package/config/gni/devtools_image_files.gni +2 -0
  3. package/docs/workflows.md +1 -1
  4. package/front_end/Images/src/file-sync_icon.svg +62 -0
  5. package/front_end/Images/src/file_icon.svg +52 -0
  6. package/front_end/Tests.js +0 -28
  7. package/front_end/core/host/UserMetrics.ts +2 -1
  8. package/front_end/core/i18n/locales/en-US.json +18 -9
  9. package/front_end/core/i18n/locales/en-XL.json +18 -9
  10. package/front_end/core/platform/string-utilities.ts +2 -5
  11. package/front_end/core/root/Runtime.ts +1 -0
  12. package/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -4
  13. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -4
  14. package/front_end/core/sdk/NetworkRequest.ts +0 -4
  15. package/front_end/core/sdk/Resource.ts +0 -5
  16. package/front_end/core/sdk/Script.ts +71 -76
  17. package/front_end/core/sdk/Target.ts +4 -0
  18. package/front_end/entrypoints/inspector_main/InspectorMain.ts +4 -1
  19. package/front_end/entrypoints/main/MainImpl.ts +4 -0
  20. package/front_end/generated/InspectorBackendCommands.js +10 -8
  21. package/front_end/generated/protocol-mapping.d.ts +16 -2
  22. package/front_end/generated/protocol-proxy-api.d.ts +11 -1
  23. package/front_end/generated/protocol.ts +75 -1
  24. package/front_end/models/bindings/CompilerScriptMapping.ts +6 -3
  25. package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
  26. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -4
  27. package/front_end/models/bindings/IgnoreListManager.ts +10 -8
  28. package/front_end/models/bindings/ResourceMapping.ts +0 -4
  29. package/front_end/models/bindings/StylesSourceMapping.ts +0 -5
  30. package/front_end/models/extensions/ExtensionServer.ts +2 -3
  31. package/front_end/models/issues_manager/AttributionReportingIssue.ts +8 -0
  32. package/front_end/models/issues_manager/DeprecationIssue.ts +5 -1
  33. package/front_end/models/issues_manager/descriptions/arTooManyConcurrentRequests.md +5 -0
  34. package/front_end/models/javascript_metadata/NativeFunctions.js +6 -2
  35. package/front_end/models/persistence/NetworkPersistenceManager.ts +4 -6
  36. package/front_end/models/persistence/PersistenceActions.ts +5 -4
  37. package/front_end/models/text_utils/CodeMirrorUtils.ts +17 -4
  38. package/front_end/models/text_utils/ContentProvider.ts +0 -1
  39. package/front_end/models/text_utils/StaticContentProvider.ts +0 -4
  40. package/front_end/models/workspace/UISourceCode.ts +10 -5
  41. package/front_end/panels/application/components/StackTrace.ts +2 -2
  42. package/front_end/panels/elements/CSSRuleValidator.ts +382 -63
  43. package/front_end/panels/elements/CSSRuleValidatorHelper.ts +34 -0
  44. package/front_end/panels/elements/ElementsTreeOutline.ts +23 -7
  45. package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
  46. package/front_end/panels/elements/TopLayerContainer.ts +17 -28
  47. package/front_end/panels/elements/components/CSSHintDetailsView.ts +23 -20
  48. package/front_end/panels/elements/components/cssHintDetailsView.css +8 -2
  49. package/front_end/panels/elements/stylesSectionTree.css +1 -1
  50. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +12 -0
  51. package/front_end/panels/network/components/RequestHeadersView.css +41 -8
  52. package/front_end/panels/network/components/RequestHeadersView.ts +102 -12
  53. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
  54. package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +7 -0
  55. package/front_end/panels/sources/NavigatorView.ts +22 -0
  56. package/front_end/panels/sources/ScopeChainSidebarPane.ts +3 -3
  57. package/front_end/third_party/codemirror.next/bundle.ts +1 -1
  58. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  59. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
  60. package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
  61. package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
  62. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
  63. package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
  64. package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
  65. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
  66. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
  67. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1247 -116
  68. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
  69. package/front_end/ui/components/data_grid/DataGrid.ts +15 -10
  70. package/front_end/ui/components/data_grid/DataGridController.ts +7 -0
  71. package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +64 -0
  72. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +2 -3
  73. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +97 -17
  74. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +1 -1
  75. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewerUtils.ts +4 -0
  76. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +9 -7
  77. package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -11
  78. package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -1
  79. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +49 -0
  80. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +18 -17
  81. package/package.json +6 -5
@@ -56,6 +56,8 @@ grd_files_release_sources = [
56
56
  "front_end/Images/errorWave.svg",
57
57
  "front_end/Images/error_icon.svg",
58
58
  "front_end/Images/feedback_button_icon.svg",
59
+ "front_end/Images/file-sync_icon.svg",
60
+ "front_end/Images/file_icon.svg",
59
61
  "front_end/Images/flex-direction-icon.svg",
60
62
  "front_end/Images/flex-nowrap-icon.svg",
61
63
  "front_end/Images/flex-wrap-icon.svg",
@@ -938,6 +940,7 @@ grd_files_debug_sources = [
938
940
  "front_end/panels/elements/AccessibilityTreeUtils.js",
939
941
  "front_end/panels/elements/AccessibilityTreeView.js",
940
942
  "front_end/panels/elements/CSSRuleValidator.js",
943
+ "front_end/panels/elements/CSSRuleValidatorHelper.js",
941
944
  "front_end/panels/elements/ClassesPaneWidget.js",
942
945
  "front_end/panels/elements/ColorSwatchPopoverIcon.js",
943
946
  "front_end/panels/elements/ComputedStyleModel.js",
@@ -66,6 +66,8 @@ devtools_svg_sources = [
66
66
  "errorWave.svg",
67
67
  "error_icon.svg",
68
68
  "feedback_button_icon.svg",
69
+ "file-sync_icon.svg",
70
+ "file_icon.svg",
69
71
  "flex-direction-icon.svg",
70
72
  "flex-nowrap-icon.svg",
71
73
  "flex-wrap-icon.svg",
package/docs/workflows.md CHANGED
@@ -64,7 +64,7 @@ This works with Chromium 79 or later.
64
64
 
65
65
  Note that `$(realpath out/Default/gen/front_end)` expands to the absolute path to build artifacts for DevTools frontend.
66
66
 
67
- Open DevTools via F12 on Windows/Linux or Cmd+Option+I on Mac.
67
+ Open DevTools via F12 or Ctrl+Shift+J on Windows/Linux or Cmd+Option+I on Mac.
68
68
 
69
69
  If you get errors along the line of `Uncaught TypeError: Cannot read property 'setInspectedTabId'` you probably specified an incorrect path - the path has to be absolute. On Mac and Linux, the file url will start with __three__ slashes: `file:///Users/...`.
70
70
 
@@ -0,0 +1,62 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="11"
6
+ height="13"
7
+ viewBox="0 0 2.9104166 3.4395834"
8
+ version="1.1"
9
+ id="svg298"
10
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
11
+ sodipodi:docname="file-sync_icon.svg"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ xmlns:svg="http://www.w3.org/2000/svg">
16
+ <sodipodi:namedview
17
+ id="namedview300"
18
+ pagecolor="#ffffff"
19
+ bordercolor="#666666"
20
+ borderopacity="1.0"
21
+ inkscape:pageshadow="2"
22
+ inkscape:pageopacity="0.0"
23
+ inkscape:pagecheckerboard="0"
24
+ inkscape:document-units="mm"
25
+ showgrid="false"
26
+ units="px"
27
+ inkscape:zoom="6.7736083"
28
+ inkscape:cx="-60.602855"
29
+ inkscape:cy="-53.737976"
30
+ inkscape:window-width="2028"
31
+ inkscape:window-height="1445"
32
+ inkscape:window-x="0"
33
+ inkscape:window-y="0"
34
+ inkscape:window-maximized="1"
35
+ inkscape:current-layer="layer1" />
36
+ <defs
37
+ id="defs295" />
38
+ <g
39
+ inkscape:label="Layer 1"
40
+ inkscape:groupmode="layer"
41
+ id="layer1">
42
+ <g
43
+ id="g4825"
44
+ transform="matrix(0.26458333,0,0,0.26458333,-0.26458331,-0.26458331)">
45
+ <g
46
+ id="g4829"
47
+ transform="translate(-76,-24)">
48
+ <circle
49
+ style="fill:#009802"
50
+ id="circle4831"
51
+ r="2.5"
52
+ cy="11.5"
53
+ cx="10.5"
54
+ transform="matrix(1.2,0,0,1.2,72.4,21.2)" />
55
+ <path
56
+ inkscape:connector-curvature="0"
57
+ id="path4833"
58
+ d="m 78,25 c -0.54399,0 -1,0.45026 -1,1 v 8 c 0,0.53973 0.44936,1 1,1 h 3.0312 c -0.02335,-0.1633 -0.03125,-0.33024 -0.03125,-0.5 0,-0.16976 0.0079,-0.3367 0.03125,-0.5 H 78 v -8 h 3 v 3 h 3 v 1.5 c 0.1633,-0.02335 0.33024,0 0.5,0 0.16976,0 0.3367,-0.02335 0.5,0 V 28 l -3,-3 z m 4,1 2,2 h -2 z" />
59
+ </g>
60
+ </g>
61
+ </g>
62
+ </svg>
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="12"
6
+ height="12"
7
+ viewBox="0 0 3.1749999 3.1750001"
8
+ version="1.1"
9
+ id="svg232"
10
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
11
+ sodipodi:docname="file_icon.svg"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ xmlns:svg="http://www.w3.org/2000/svg">
16
+ <sodipodi:namedview
17
+ id="namedview234"
18
+ pagecolor="#ffffff"
19
+ bordercolor="#666666"
20
+ borderopacity="1.0"
21
+ inkscape:pageshadow="2"
22
+ inkscape:pageopacity="0.0"
23
+ inkscape:pagecheckerboard="0"
24
+ inkscape:document-units="mm"
25
+ showgrid="false"
26
+ units="px"
27
+ inkscape:zoom="16.687513"
28
+ inkscape:cx="-9.49812"
29
+ inkscape:cy="4.5543036"
30
+ inkscape:window-width="2028"
31
+ inkscape:window-height="1445"
32
+ inkscape:window-x="0"
33
+ inkscape:window-y="0"
34
+ inkscape:window-maximized="1"
35
+ inkscape:current-layer="layer1" />
36
+ <defs
37
+ id="defs229" />
38
+ <g
39
+ inkscape:label="Layer 1"
40
+ inkscape:groupmode="layer"
41
+ id="layer1">
42
+ <g
43
+ id="g4835"
44
+ transform="matrix(0.26458333,0,0,0.26458333,0.26459658,1.9999999e-8)">
45
+ <path
46
+ inkscape:connector-curvature="0"
47
+ id="path4839"
48
+ d="m 71.625,25.5 h -4.003 c -0.54399,0 -0.99703,0.44566 -0.99703,0.9954 v 8.0092 c 0,0.53973 0.44639,0.9954 0.99703,0.9954 h 6.0059 c 0.54399,0 0.99703,-0.44566 0.99703,-0.9954 V 28.5 l -3,-3 z m 0,1 2,2 h -2 z m -4,0 h 3 v 3 h 3 v 5 h -6 z"
49
+ transform="translate(-65.625,-24.5)" />
50
+ </g>
51
+ </g>
52
+ </svg>
@@ -275,34 +275,6 @@
275
275
  this.takeControl();
276
276
  };
277
277
 
278
- /**
279
- * Tests that scripts tab is populated with inspected scripts even if it
280
- * hadn't been shown by the moment inspected paged refreshed.
281
- * @see http://crbug.com/26312
282
- */
283
- TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function() {
284
- const test = this;
285
- const debuggerModel = self.SDK.targetManager.mainTarget().model(SDK.DebuggerModel);
286
- debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, waitUntilScriptIsParsed);
287
-
288
- this.showPanel('elements').then(function() {
289
- // Reload inspected page. It will reset the debugger agent.
290
- test.evaluateInConsole_('window.location.reload(true);', function(resultText) {});
291
- });
292
-
293
- function waitUntilScriptIsParsed() {
294
- debuggerModel.removeEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, waitUntilScriptIsParsed);
295
- test.showPanel('sources').then(function() {
296
- test._waitUntilScriptsAreParsed(['debugger_test_page.html'], function() {
297
- test.releaseControl();
298
- });
299
- });
300
- }
301
-
302
- // Wait until all scripts are added to the debugger.
303
- this.takeControl();
304
- };
305
-
306
278
  /**
307
279
  * Tests that scripts list contains content scripts.
308
280
  */
@@ -637,8 +637,9 @@ export enum DevtoolsExperiments {
637
637
  'cssAuthoringHints' = 62,
638
638
  'authoredDeployedGrouping' = 63,
639
639
  'importantDOMProperties' = 64,
640
+ 'justMyCode' = 65,
640
641
  // Increment this when new experiments are added.
641
- 'MaxValue' = 65,
642
+ 'MaxValue' = 66,
642
643
  }
643
644
  /* eslint-enable @typescript-eslint/naming-convention */
644
645
 
@@ -4836,22 +4836,25 @@
4836
4836
  "message": "Show all"
4837
4837
  },
4838
4838
  "panels/elements/CSSRuleValidator.ts | deprecatedPropertyHintPrefix": {
4839
- "message": "Deprecated Property"
4839
+ "message": "Deprecated property"
4840
4840
  },
4841
- "panels/elements/CSSRuleValidator.ts | ruleValidationHintPrefix": {
4842
- "message": "Inactive rule"
4841
+ "panels/elements/CSSRuleValidator.ts | inactivePropertyHintPrefix": {
4842
+ "message": "Inactive property"
4843
4843
  },
4844
4844
  "panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleFix": {
4845
- "message": "Please change parent elements {EXISTING_PARENT_ELEMENT_RULE} to {TARGET_PARENT_ELEMENT_RULE} to fix this issue."
4845
+ "message": "Please change the parent element's property declaration from {EXISTING_PARENT_ELEMENT_RULE} to {TARGET_PARENT_ELEMENT_RULE} to fix this issue."
4846
4846
  },
4847
4847
  "panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleReason": {
4848
- "message": "Parent element has {REASON_RULE_CODE} rule, therefore this elements {AFFECTED_RULE_CODE} has no effect"
4848
+ "message": "The parent element has the {REASON_PROPERTY_DECLARATION_CODE} property and therefore, this element's property {AFFECTED_PROPERTY_DECLARATION_CODE} has no effect."
4849
+ },
4850
+ "panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleChangeSuggestion": {
4851
+ "message": "For this property to work, please change the {EXISTING_PROPERTY_DECLARATION} rule to {TARGET_PROPERTY_DECLARATION}."
4849
4852
  },
4850
4853
  "panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleFix": {
4851
- "message": "For this property to work, please remove or change the value of {REASON_RULE_CODE}"
4854
+ "message": "For this property to work, please remove or change the value of {REASON_PROPERTY_DECLARATION_CODE}."
4852
4855
  },
4853
4856
  "panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleReason": {
4854
- "message": "This element has {REASON_RULE_CODE} rule, therefore {AFFECTED_RULE_CODE} has no effect."
4857
+ "message": "This element has the {REASON_PROPERTY_DECLARATION_CODE} property and therefore, {AFFECTED_PROPERTY_DECLARATION_CODE} has no effect."
4855
4858
  },
4856
4859
  "panels/elements/DOMLinkifier.ts | node": {
4857
4860
  "message": "<node>"
@@ -5327,8 +5330,8 @@
5327
5330
  "panels/elements/StylesSidebarPane.ts | unknownPropertyName": {
5328
5331
  "message": "Unknown property name"
5329
5332
  },
5330
- "panels/elements/TopLayerContainer.ts | topLayer": {
5331
- "message": "top-layer"
5333
+ "panels/elements/TopLayerContainer.ts | reveal": {
5334
+ "message": "reveal"
5332
5335
  },
5333
5336
  "panels/emulation/DeviceModeToolbar.ts | addDevicePixelRatio": {
5334
5337
  "message": "Add device pixel ratio"
@@ -5714,6 +5717,9 @@
5714
5717
  "panels/issues/AttributionReportingIssueDetailsView.ts | invalidHeaderValue": {
5715
5718
  "message": "Invalid Header Value"
5716
5719
  },
5720
+ "panels/issues/AttributionReportingIssueDetailsView.ts | maximumConcurrentRegistrations": {
5721
+ "message": "Maximum Concurrent Registrations"
5722
+ },
5717
5723
  "panels/issues/AttributionReportingIssueDetailsView.ts | nViolations": {
5718
5724
  "message": "{n, plural, =1 {# violation} other {# violations}}"
5719
5725
  },
@@ -6860,6 +6866,9 @@
6860
6866
  "panels/network/components/RequestHeadersView.ts | general": {
6861
6867
  "message": "General"
6862
6868
  },
6869
+ "panels/network/components/RequestHeadersView.ts | headerOverrides": {
6870
+ "message": "Header overrides"
6871
+ },
6863
6872
  "panels/network/components/RequestHeadersView.ts | learnMore": {
6864
6873
  "message": "Learn more"
6865
6874
  },
@@ -4836,22 +4836,25 @@
4836
4836
  "message": "Ŝh́ôẃ âĺl̂"
4837
4837
  },
4838
4838
  "panels/elements/CSSRuleValidator.ts | deprecatedPropertyHintPrefix": {
4839
- "message": "D̂ép̂ŕêćât́êd́ P̂ŕôṕêŕt̂ý"
4839
+ "message": "D̂ép̂ŕêćât́êd́ p̂ŕôṕêŕt̂ý"
4840
4840
  },
4841
- "panels/elements/CSSRuleValidator.ts | ruleValidationHintPrefix": {
4842
- "message": "Îńâćt̂ív̂é r̂úl̂é"
4841
+ "panels/elements/CSSRuleValidator.ts | inactivePropertyHintPrefix": {
4842
+ "message": "Îńâćt̂ív̂é ŕôṕêŕt̂ý"
4843
4843
  },
4844
4844
  "panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleFix": {
4845
- "message": "P̂ĺêáŝé ĉh́âńĝé p̂ár̂én̂t́ êĺêḿêńt̂ś {EXISTING_PARENT_ELEMENT_RULE} t̂ó {TARGET_PARENT_ELEMENT_RULE} t̂ó f̂íx̂ t́ĥíŝ íŝśûé."
4845
+ "message": "P̂ĺêáŝé ĉh́âńĝé t̂h́ê ṕâŕêńt̂ l̂ém̂én̂t́'ŝ ṕr̂óér̂t́ŷ d́ćl̂ár̂áíôń f̂ŕôḿ {EXISTING_PARENT_ELEMENT_RULE} t̂ó {TARGET_PARENT_ELEMENT_RULE} t̂ó f̂íx̂ t́ĥíŝ íŝśûé."
4846
4846
  },
4847
4847
  "panels/elements/CSSRuleValidator.ts | ruleViolatedByParentElementRuleReason": {
4848
- "message": "P̂ár̂én̂t́ êĺêḿêńt̂ ś {REASON_RULE_CODE} úl̂é, t̂h́êŕêf́ôŕê ĥíŝ éém̂én̂t́ {AFFECTED_RULE_CODE} h́â êf́f̂ét́"
4848
+ "message": "T̂h́ê ṕâŕêńt̂ l̂ém̂én̂t́ ĥáŝ t́ĥé {REASON_PROPERTY_DECLARATION_CODE} p̂ŕôṕŕt̂ń t́ĥééf̂ór̂é, t̂h́îś ĺêḿêt̂'ś p̂ŕôṕêŕt̂ý {AFFECTED_PROPERTY_DECLARATION_CODE} ĥáŝ ńô éf̂f́êćt̂."
4849
+ },
4850
+ "panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleChangeSuggestion": {
4851
+ "message": "F̂ór̂ t́ĥíŝ ṕr̂óp̂ér̂t́ŷ t́ô ẃôŕk̂, ṕl̂éâśê ćĥán̂ǵê t́ĥé {EXISTING_PROPERTY_DECLARATION} r̂úl̂é t̂ó {TARGET_PROPERTY_DECLARATION}."
4849
4852
  },
4850
4853
  "panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleFix": {
4851
- "message": "F̂ór̂ t́ĥíŝ ṕr̂óp̂ér̂t́ŷ t́ô ẃôŕk̂, ṕl̂éâśê ŕêḿôv́ê ór̂ ćĥán̂ǵê t́ĥé v̂ál̂úê óf̂ {REASON_RULE_CODE}"
4854
+ "message": "F̂ór̂ t́ĥíŝ ṕr̂óp̂ér̂t́ŷ t́ô ẃôŕk̂, ṕl̂éâśê ŕêḿôv́ê ór̂ ćĥán̂ǵê t́ĥé v̂ál̂úê óf̂ {REASON_PROPERTY_DECLARATION_CODE}."
4852
4855
  },
4853
4856
  "panels/elements/CSSRuleValidator.ts | ruleViolatedBySameElementRuleReason": {
4854
- "message": "T̂h́îś êĺêḿêńt̂ h́âś {REASON_RULE_CODE} r̂úl̂é, t̂h́êŕêf́ôŕê {AFFECTED_RULE_CODE} h́âś n̂ó êf́f̂éĉt́."
4857
+ "message": "T̂h́îś êĺêḿêńt̂ h́âś t̂h́ê {REASON_PROPERTY_DECLARATION_CODE} óp̂ér̂t́ŷ án̂d́ t̂h́êŕêf́ôŕê, {AFFECTED_PROPERTY_DECLARATION_CODE} h́âś n̂ó êf́f̂éĉt́."
4855
4858
  },
4856
4859
  "panels/elements/DOMLinkifier.ts | node": {
4857
4860
  "message": "<n̂ód̂é>"
@@ -5327,8 +5330,8 @@
5327
5330
  "panels/elements/StylesSidebarPane.ts | unknownPropertyName": {
5328
5331
  "message": "Ûńk̂ńôẃn̂ ṕr̂óp̂ér̂t́ŷ ńâḿê"
5329
5332
  },
5330
- "panels/elements/TopLayerContainer.ts | topLayer": {
5331
- "message": "t̂óp̂-ĺâýêŕ"
5333
+ "panels/elements/TopLayerContainer.ts | reveal": {
5334
+ "message": "r̂év̂éâĺ"
5332
5335
  },
5333
5336
  "panels/emulation/DeviceModeToolbar.ts | addDevicePixelRatio": {
5334
5337
  "message": "Âd́d̂ d́êv́îćê ṕîx́êĺ r̂át̂íô"
@@ -5714,6 +5717,9 @@
5714
5717
  "panels/issues/AttributionReportingIssueDetailsView.ts | invalidHeaderValue": {
5715
5718
  "message": "Îńv̂ál̂íd̂ H́êád̂ér̂ V́âĺûé"
5716
5719
  },
5720
+ "panels/issues/AttributionReportingIssueDetailsView.ts | maximumConcurrentRegistrations": {
5721
+ "message": "M̂áx̂ím̂úm̂ Ćôńĉúr̂ŕêńt̂ Ŕêǵîśt̂ŕât́îón̂ś"
5722
+ },
5717
5723
  "panels/issues/AttributionReportingIssueDetailsView.ts | nViolations": {
5718
5724
  "message": "{n, plural, =1 {# v̂íôĺât́îón̂} other {# v́îól̂át̂íôńŝ}}"
5719
5725
  },
@@ -6860,6 +6866,9 @@
6860
6866
  "panels/network/components/RequestHeadersView.ts | general": {
6861
6867
  "message": "Ĝén̂ér̂ál̂"
6862
6868
  },
6869
+ "panels/network/components/RequestHeadersView.ts | headerOverrides": {
6870
+ "message": "Ĥéâd́êŕ ôv́êŕr̂íd̂éŝ"
6871
+ },
6863
6872
  "panels/network/components/RequestHeadersView.ts | learnMore": {
6864
6873
  "message": "L̂éâŕn̂ ḿôŕê"
6865
6874
  },
@@ -263,16 +263,13 @@ export const regexSpecialCharacters = function(): string {
263
263
  };
264
264
 
265
265
  export const filterRegex = function(query: string): RegExp {
266
- let regexString = '';
266
+ let regexString = '^(?:.*\\0)?'; // Start from beginning or after a \0
267
267
  for (let i = 0; i < query.length; ++i) {
268
268
  let c = query.charAt(i);
269
269
  if (SPECIAL_REGEX_CHARACTERS.indexOf(c) !== -1) {
270
270
  c = '\\' + c;
271
271
  }
272
- if (i) {
273
- regexString += '[^\\0' + c + ']*';
274
- }
275
- regexString += c;
272
+ regexString += '[^\\0' + c + ']*' + c;
276
273
  }
277
274
  return new RegExp(regexString, 'i');
278
275
  };
@@ -294,6 +294,7 @@ export enum ExperimentName {
294
294
  CSS_AUTHORING_HINTS = 'cssAuthoringHints',
295
295
  AUTHORED_DEPLOYED_GROUPING = 'authoredDeployedGrouping',
296
296
  IMPORTANT_DOM_PROPERTIES = 'importantDOMProperties',
297
+ JUST_MY_CODE = 'justMyCode',
297
298
  }
298
299
 
299
300
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -166,10 +166,6 @@ export class CSSStyleSheetHeader implements TextUtils.ContentProvider.ContentPro
166
166
  return Common.ResourceType.resourceTypes.Stylesheet;
167
167
  }
168
168
 
169
- contentEncoded(): Promise<boolean> {
170
- return Promise.resolve(false);
171
- }
172
-
173
169
  async requestContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
174
170
  try {
175
171
  const cssText = await this.#cssModelInternal.getStyleSheetText(this.id);
@@ -68,10 +68,6 @@ export class CompilerSourceMappingContentProvider implements TextUtils.ContentPr
68
68
  return this.#contentTypeInternal;
69
69
  }
70
70
 
71
- async contentEncoded(): Promise<boolean> {
72
- return false;
73
- }
74
-
75
71
  async requestContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
76
72
  try {
77
73
  const {content} = await PageResourceLoader.instance().loadResource(this.#sourceURL, this.#initiator);
@@ -1196,10 +1196,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
1196
1196
  return this.#resourceTypeInternal;
1197
1197
  }
1198
1198
 
1199
- async contentEncoded(): Promise<boolean> {
1200
- return (await this.contentData()).encoded;
1201
- }
1202
-
1203
1199
  async requestContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
1204
1200
  const {content, error, encoded} = await this.contentData();
1205
1201
  return {
@@ -162,11 +162,6 @@ export class Resource implements TextUtils.ContentProvider.ContentProvider {
162
162
  return this.resourceType();
163
163
  }
164
164
 
165
- async contentEncoded(): Promise<boolean> {
166
- await this.requestContent();
167
- return this.#contentEncodedInternal;
168
- }
169
-
170
165
  async requestContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
171
166
  if (typeof this.#contentInternal !== 'undefined') {
172
167
  return {
@@ -69,7 +69,6 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
69
69
  debugSymbols: Protocol.Debugger.DebugSymbols|null;
70
70
  hasSourceURL: boolean;
71
71
  contentLength: number;
72
- #originalContentProviderInternal: TextUtils.ContentProvider.ContentProvider|null;
73
72
  originStackTrace: Protocol.Runtime.StackTrace|null;
74
73
  readonly #codeOffsetInternal: number|null;
75
74
  readonly #language: string|null;
@@ -100,7 +99,6 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
100
99
  this.debugSymbols = debugSymbols;
101
100
  this.hasSourceURL = hasSourceURL;
102
101
  this.contentLength = length;
103
- this.#originalContentProviderInternal = null;
104
102
  this.originStackTrace = originStackTrace;
105
103
  this.#codeOffsetInternal = codeOffset;
106
104
  this.#language = scriptLanguage;
@@ -171,13 +169,79 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
171
169
  return Common.ResourceType.resourceTypes.Script;
172
170
  }
173
171
 
174
- async contentEncoded(): Promise<boolean> {
175
- return false;
172
+ private async loadTextContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
173
+ const result = await this.debuggerModel.target().debuggerAgent().invoke_getScriptSource({scriptId: this.scriptId});
174
+ if (result.getError()) {
175
+ throw new Error(result.getError());
176
+ }
177
+ const {scriptSource, bytecode} = result;
178
+ if (bytecode) {
179
+ return {content: bytecode, isEncoded: true};
180
+ }
181
+ let content: string = scriptSource || '';
182
+ if (this.hasSourceURL && this.sourceURL.startsWith('snippet://')) {
183
+ // TODO(crbug.com/1330846): Find a better way to establish the snippet automapping binding then adding
184
+ // a sourceURL comment before evaluation and removing it here.
185
+ content = Script.trimSourceURLComment(content);
186
+ }
187
+ return {content, isEncoded: false};
188
+ }
189
+
190
+ private async loadWasmContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
191
+ if (!this.isWasm()) {
192
+ throw new Error('Not a wasm script');
193
+ }
194
+ const result =
195
+ await this.debuggerModel.target().debuggerAgent().invoke_disassembleWasmModule({scriptId: this.scriptId});
196
+
197
+ if (result.getError()) {
198
+ // Fall through to text content loading if v8-based disassembly fails. This is to ensure backwards compatibility with
199
+ // older v8 versions;
200
+ return this.loadTextContent();
201
+ }
202
+
203
+ const {streamId, functionBodyOffsets, chunk: {lines, bytecodeOffsets}} = result;
204
+ const lineChunks = [];
205
+ const bytecodeOffsetChunks = [];
206
+ if (streamId) {
207
+ while (true) {
208
+ const result = await this.debuggerModel.target().debuggerAgent().invoke_nextWasmDisassemblyChunk({streamId});
209
+
210
+ if (result.getError()) {
211
+ throw new Error(result.getError());
212
+ }
213
+
214
+ const {chunk: {lines: linesChunk, bytecodeOffsets: bytecodeOffsetsChunk}} = result;
215
+ if (linesChunk.length === 0) {
216
+ break;
217
+ }
218
+ lineChunks.push(linesChunk);
219
+ bytecodeOffsetChunks.push(bytecodeOffsetsChunk);
220
+ }
221
+ }
222
+ const functionBodyRanges: Array<{start: number, end: number}> = [];
223
+ // functionBodyOffsets contains a sequence of pairs of start and end offsets
224
+ for (let i = 0; i < functionBodyOffsets.length; i += 2) {
225
+ functionBodyRanges.push({start: functionBodyOffsets[i], end: functionBodyOffsets[i + 1]});
226
+ }
227
+ const wasmDisassemblyInfo = new Common.WasmDisassembly.WasmDisassembly(
228
+ lines.concat(...lineChunks), bytecodeOffsets.concat(...bytecodeOffsetChunks), functionBodyRanges);
229
+ return {content: '', isEncoded: false, wasmDisassemblyInfo};
176
230
  }
177
231
 
178
232
  requestContent(): Promise<TextUtils.ContentProvider.DeferredContent> {
179
233
  if (!this.#contentPromise) {
180
- this.#contentPromise = this.originalContentProvider().requestContent();
234
+ this.#contentPromise = (async(): Promise<TextUtils.ContentProvider.DeferredContent> => {
235
+ if (!this.scriptId) {
236
+ return {content: null, error: i18nString(UIStrings.scriptRemovedOrDeleted), isEncoded: false};
237
+ }
238
+ try {
239
+ return this.isWasm() ? await this.loadWasmContent() : await this.loadTextContent();
240
+ } catch (err) {
241
+ // TODO(bmeurer): Propagate errors as exceptions / rejections.
242
+ return {content: null, error: i18nString(UIStrings.unableToFetchScriptSource), isEncoded: false};
243
+ }
244
+ })();
181
245
  }
182
246
  return this.#contentPromise;
183
247
  }
@@ -189,77 +253,8 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
189
253
  }
190
254
 
191
255
  originalContentProvider(): TextUtils.ContentProvider.ContentProvider {
192
- if (!this.#originalContentProviderInternal) {
193
- let lazyContentPromise: Promise<TextUtils.ContentProvider.DeferredContent>|null;
194
- this.#originalContentProviderInternal =
195
- new TextUtils.StaticContentProvider.StaticContentProvider(this.contentURL(), this.contentType(), () => {
196
- if (!lazyContentPromise) {
197
- lazyContentPromise = (async(): Promise<TextUtils.ContentProvider.DeferredContent> => {
198
- if (!this.scriptId) {
199
- return {content: null, error: i18nString(UIStrings.scriptRemovedOrDeleted), isEncoded: false};
200
- }
201
- if (this.isWasm()) {
202
- const result = await this.debuggerModel.target().debuggerAgent().invoke_disassembleWasmModule(
203
- {scriptId: this.scriptId});
204
-
205
- if (result.getError()) {
206
- throw new Error(result.getError());
207
- }
208
-
209
- const {streamId, functionBodyOffsets, chunk: {lines, bytecodeOffsets}} = result;
210
- const lineChunks = [];
211
- const bytecodeOffsetChunks = [];
212
- if (streamId) {
213
- while (true) {
214
- const result =
215
- await this.debuggerModel.target().debuggerAgent().invoke_nextWasmDisassemblyChunk({streamId});
216
-
217
- if (result.getError()) {
218
- throw new Error(result.getError());
219
- }
220
-
221
- const {chunk: {lines: linesChunk, bytecodeOffsets: bytecodeOffsetsChunk}} = result;
222
- if (linesChunk.length === 0) {
223
- break;
224
- }
225
- lineChunks.push(linesChunk);
226
- bytecodeOffsetChunks.push(bytecodeOffsetsChunk);
227
- }
228
- }
229
- const functionBodyRanges: Array<{start: number, end: number}> = [];
230
- // functionBodyOffsets contains a sequence of pairs of start and end offsets
231
- for (let i = 0; i < functionBodyOffsets.length; i += 2) {
232
- functionBodyRanges.push({start: functionBodyOffsets[i], end: functionBodyOffsets[i + 1]});
233
- }
234
- const wasmDisassemblyInfo = new Common.WasmDisassembly.WasmDisassembly(
235
- lines.concat(...lineChunks), bytecodeOffsets.concat(...bytecodeOffsetChunks), functionBodyRanges);
236
- return {content: '', isEncoded: false, wasmDisassemblyInfo};
237
- }
238
- try {
239
- const result = await this.debuggerModel.target().debuggerAgent().invoke_getScriptSource(
240
- {scriptId: this.scriptId});
241
- if (result.getError()) {
242
- throw new Error(result.getError());
243
- }
244
- const {scriptSource} = result;
245
- let content: string = scriptSource || '';
246
- if (this.hasSourceURL && this.sourceURL.startsWith('snippet://')) {
247
- // TODO(crbug.com/1330846): Find a better way to establish the snippet automapping binding then adding
248
- // a sourceURL comment before evaluation and removing it here.
249
- content = Script.trimSourceURLComment(content);
250
- }
251
- return {content, isEncoded: false};
252
-
253
- } catch (err) {
254
- // TODO(bmeurer): Propagate errors as exceptions / rejections.
255
- return {content: null, error: i18nString(UIStrings.unableToFetchScriptSource), isEncoded: false};
256
- }
257
- })();
258
- }
259
- return lazyContentPromise;
260
- });
261
- }
262
- return this.#originalContentProviderInternal;
256
+ return new TextUtils.StaticContentProvider.StaticContentProvider(
257
+ this.contentURL(), this.contentType(), () => this.requestContent());
263
258
  }
264
259
 
265
260
  async searchInContent(query: string, caseSensitive: boolean, isRegex: boolean):
@@ -73,6 +73,9 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
73
73
  case Type.Browser:
74
74
  this.#capabilitiesMask = Capability.Target | Capability.IO;
75
75
  break;
76
+ case Type.Tab:
77
+ this.#capabilitiesMask = Capability.Target;
78
+ break;
76
79
  }
77
80
  this.#typeInternal = type;
78
81
  this.#parentTargetInternal = parentTarget;
@@ -227,6 +230,7 @@ export enum Type {
227
230
  Node = 'node',
228
231
  Browser = 'browser',
229
232
  AuctionWorklet = 'auction-worklet',
233
+ Tab = 'tab',
230
234
  }
231
235
 
232
236
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -52,7 +52,10 @@ export class InspectorMainImpl implements Common.Runnable.Runnable {
52
52
  async run(): Promise<void> {
53
53
  let firstCall = true;
54
54
  await SDK.Connections.initMainConnection(async () => {
55
- const type = Root.Runtime.Runtime.queryParam('v8only') ? SDK.Target.Type.Node : SDK.Target.Type.Frame;
55
+ const type = Root.Runtime.Runtime.queryParam('v8only') ?
56
+ SDK.Target.Type.Node :
57
+ (Root.Runtime.Runtime.queryParam('targetType') === 'tab' ? SDK.Target.Type.Tab : SDK.Target.Type.Frame);
58
+ // TODO(crbug.com/1348385): support waiting for debugger with tab target.
56
59
  const waitForDebuggerInPage =
57
60
  type === SDK.Target.Type.Frame && Root.Runtime.Runtime.queryParam('panel') === 'sources';
58
61
  const target = SDK.TargetManager.TargetManager.instance().createTarget(
@@ -406,6 +406,10 @@ export class MainImpl {
406
406
  Root.Runtime.experiments.register(
407
407
  Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING, 'Group sources into Authored and Deployed trees');
408
408
 
409
+ // Hide third party code (as determined by ignore lists or source maps)
410
+ Root.Runtime.experiments.register(
411
+ Root.Runtime.ExperimentName.JUST_MY_CODE, 'Hide ignore-listed code in sources tree view');
412
+
409
413
  // Highlight important DOM properties in the Object Properties viewer.
410
414
  Root.Runtime.experiments.register(
411
415
  Root.Runtime.ExperimentName.IMPORTANT_DOM_PROPERTIES,